#ifdef FSHIGHPRECISION
	precision highp float;
#else
	precision mediump float;
#endif

varying vec2 v_Texcoord0;
varying vec2 v_Texcoord1;

#ifdef BASETEXTURE
	uniform sampler2D u_BaseTexture;
#endif

#ifdef SECONDTEXTURE
	uniform sampler2D u_SecondTexture;
#endif

uniform vec4 u_BaseColor;
uniform float u_MMultiplier;
uniform float u_Alpha;

void main()
{
	vec4 baseTextureColor = vec4(1.0);
	#ifdef BASETEXTURE
		baseTextureColor = texture2D(u_BaseTexture, v_Texcoord0);
	#endif
	
	vec4 secondTextureColor = vec4(1.0);
	#ifdef SECONDTEXTURE
		secondTextureColor = texture2D(u_SecondTexture, v_Texcoord1);
	#endif
	
	gl_FragColor = baseTextureColor * secondTextureColor * u_BaseColor * u_MMultiplier;
	gl_FragColor.a *= u_Alpha;
}
